from django.db import models
import sys
import os

LIB_DIR = './lib'

sys.path.append(os.path.join(LIB_DIR))
# Create your models here.
import pnp.cfg as cfg
from pnp.services.pnpregistration import PnpRegistration

def getRegistrationInfo(options):
    pnpr = PnpRegistration()
    if options:
        pnpr.setOptions(options)
        print(options)
    pnpr.initData()
    tvec,R = pnpr.exec()
    return {
        "t":tvec,
        "r":R
    }